
<!DOCTYPE html>
<html>
<head>

    <title>确认订单-订单详情</title>
    {include file="public/head" /}


<body>
<div class="mfc order bc-back fl">
    <div class="cbox gap">
        {empty name="$address"}
        <div class="order-status-info">
            <p class="imark lh20"><span class="fa icon-site1"></span> 订单配送至</p>
            <div class="adress-info">
                <a onclick="address()" class="mfc lh16 gap prel-box">
                    <span>选择地址</span>
                    <span class="fr fa fa-angle-right c-gray fa-lg pabs-r-box"></span>
                </a>

            </div>
        </div>
        {else/}
        <div class="order-status-info">
            <p class="imark lh20"><span class="fa icon-site1"></span> 订单配送至</p>
            <div class="adress-info">
                <a onclick="address()" class="mfc lh16 gap prel-box">
                    <div>
                    <span>{$address.name} {$address.mobile}</span>
                    </div>
                    <div>
                    <span>{$address.prov} {$address.city} {$address.area} {$address.name}</span>
                    </div>
                    <span class="fr fa fa-angle-right c-gray fa-lg pabs-r-box"></span>
                </a>

            </div>
        </div>
        {/empty}
    </div>

    <div class="cbox gap">
        <div class="order-alist sr">
            {volist name="$data" id="vo"}
            {volist name="vo.list" id="vo2"}
            <div class="mfc fl">
                <div class="cell">
                    <div class="icon"><div class="sicon"><img src="{$vo2.single_pic}"></div></div>
                    <div class="info">
                        <h4 class="lh24">{$vo2.title}</h4>
                        <p class="imark lh20">规格：{$vo2.attr_values}</p>
                        <p class="imark lh20">单价{$vo2.price}  数量：{$vo2.number}</p>
                        <span class="price pabs-r-box"><span class="fa fa-cny"></span> {$vo2.number_price}</span>
                    </div>
                </div>
            </div>
            {/volist}
            {/volist}
        </div>
    </div>

<!--    <div class="cbox gap">-->
<!--        <div class="order-atext">-->
<!--            <h3>订单信息</h3>-->
<!--            <p>订单编号：1243764366453</p>-->
<!--            <p>支付方式：线上支付</p>-->
<!--            <p>下单时间：2019-06-18 16:48</p>-->
<!--            <p>下单时间：2019-06-18 18:06</p>-->
<!--            <p>配送方式：快递</p>-->
<!--            <p>运单编号：1737459345345</p>-->
<!--            <p>&nbsp;</p>-->
<!--            <p>&nbsp;</p>-->
<!--            <p>&nbsp;</p>-->
<!--        </div>-->
<!--    </div>-->
</div>


<div class="mfc cbox pfix-b-box card">
    <div class="cbox order-amount gap bsilk">
        <p class=" tr"><span>共{$total_num}种商品</span> <span>合计：</span><span class="fa fa-cny c-red">{$total_price}</span></p>
    </div>
    <div class="cbox order-option gap2i">
        <span class="imark">不含运费</span> <span>合计：</span> <span class="fa fa-cny c-red">{$total_price}</span><button class="btnbox bc-main c-white cir fs12">提交订单</button>
    </div>
</div>
<script>

    function address() {
        localStorage.setItem('gift_address',window.location.href);
        window.location.href = "{:url('Address/index')}";
    }

    $('.bc-main').click(function () {

        var str = "{$crypt_data}";
        $.ajax({
            type: "POST", //用POST方式传输
            dataType: "json", //数据格式:JSON
            url: "{:url('Order/create')}", //目标地址
            data: {data: str},
            async: false,
            traditional: false,
            // data:{distribution_type:distribution_type,order_number:order_number},
            success: function (ret) {
                if(ret.code == 200){
                    alert(ret.msg);
                    window.location.href = "{:url('Wechat/unifiedorder')}?order_number="+ret.data.order_number;
                }
            }
        });

    });

</script>
<!--<div class="Tbox active">-->
<!--    <div class="mask"></div>-->
<!--    <div class="show">-->
<!--        <div class="order-success">-->
<!--            <div class="mfc lh24 info tc">下单成功！</div>-->
<!--            <button class="btnbox oval ACT" act_v=".Tbox:active">确认</button>-->
<!--        </div>-->
<!--    </div>-->
<!--</div>-->
</body>
</html>